package com.vf.admin.client.dao;

import com.vf.admin.common.db.BaseDao;
import com.vf.admin.miaodong.entity.GoodsCart;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Repository
public class GoodsCartDao extends BaseDao<GoodsCart> {

    private List<Map> myCartGoods(Integer userId) {
        String sql = "select c.num,g.goodsName,g.goodsPrice,g.images,c.id,g.id as goodsId\n" +
                "        from goodscart c\n" +
                "        left join goods g on c.goodsId=g.id\n" +
                "        where c.userId="+ userId;
        return this.queryList(sql, new ArrayList<>(), Map.class);
    }
}
